# the first is asm score and the last is v8 score 


function GetScore()
{

  # prevent items share prefix, e.g Splay and SplayLatency
  grep "$1\W" -rn /usr1/EcmaCI/shell/262Test/benchmark.txt > /usr1/EcmaCI/shell/262Test/score.txt
  asm_score=`sed 's#.*: \+\([0-9]\+\)#\1#g' /usr1/EcmaCI/shell/262Test/score.txt | head -1`
  echo "asm_score: $asm_score"
  asm_item="$1_score_asm"
  sed -i "s#$asm_item#$asm_score#" /usr1/EcmaCI/shell/262Test/build_summary_table.wip

  v8_score=`sed 's#.*: \+\([0-9]\+\)#\1#g' /usr1/EcmaCI/shell/262Test/score.txt | tail -1`
  echo "v8_score: $v8_score"
  v8_item="$1_score_v8"
  sed -i "s/$v8_item/$v8_score/" /usr1/EcmaCI/shell/262Test/build_summary_table.wip

}

GetScore "Crypto"
GetScore "EarleyBoyer"
GetScore "RayTrace"
GetScore "Splay"
GetScore "SplayLatency"
GetScore "Box2D"
GetScore "NavierStokes"
GetScore "Richards"
GetScore "DeltaBlue"
GetScore "RegExp"
GetScore "Mandreel"
GetScore "MandreelLatency"
GetScore "PdfJS"
GetScore "Typescript"
